package com.softwareconstruction.pattern;

import com.softwareconstruction.model.Thesis;
import com.softwareconstruction.model.JournalPaper;
import com.softwareconstruction.model.ConferencePaper;

public class CountStudentVisitor implements PaperVisitor {
    private int count;
    
    public CountStudentVisitor() {
        this.count = 0;
    }
    
    @Override
    public void visit(Thesis thesis) {
        count++;
    }
    
    @Override
    public void visit(JournalPaper journalPaper) {
        count++;
    }
    
    @Override
    public void visit(ConferencePaper conferencePaper) {
        count++;
    }
    
    public int getCount() {
        return count;
    }
}